package pers.lipeng.gobang;

import javax.swing.*;
import java.awt.*;

/**
 * @author APengG
 * 棋子
 */
public class Flag extends JLabel implements Cloneable{
    private Integer bodyX;
    private Integer bodyY;
    private Color color;

    public Flag(Integer x,Integer y,Color color){
        this.bodyX = x;
        this.bodyY = y;
    }

    @Override
    public Flag clone(){
        try{
            Flag flag = (Flag) super.clone();
            return flag;
        }catch (CloneNotSupportedException e){
            e.printStackTrace();
        }
        return null;
    }

    public Integer getBodyX() {
        return bodyX;
    }

    public void setBodyX(Integer bodyX) {
        this.bodyX = bodyX;
    }

    public Integer getBodyY() {
        return bodyY;
    }

    public void setBodyY(Integer bodyY) {
        this.bodyY = bodyY;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }
}
